<!--
 * @Author: xuchen <xc13279112887@gmail.com>
 * @Date: 2025-03-20 10:53
 * @Author: xuchen <xc13279112887@gmail.com>
 * @LastEditTime: 2025-03-20 10:53
 * @Description：PubgHome.vue
 -->
<template lang="pug">
div
  el-select(v-model="playerName" placeholder="请输入玩家昵称" style="width: 200px")
    el-option(v-for="item in players" :value="item.name" :label="item.label")

  el-select(v-model="currentSeason" placeholder="请选择查询赛季" style="width: 200px")
    el-option(v-for="item in seasons" :key="item.id" :value="item.id" :label="item.label")

  el-button(@click="search") 查询

  div(v-if="rankSquadStats")
    el-row(:gutter="20")
      el-col(:span="6")
        el-statistic(title="当前排位分" :value="rankSquadStats.currentRankPoint")
      el-col(:span="6")
        el-statistic(title="当前段位" :value="rankSquadStats.currentTier.tier + rankSquadStats.currentTier.subTier")
      el-col(:span="6")
        el-statistic(title="KDA" :value="rankSquadStats.kda.toFixed(2)")
      el-col(:span="6")
        el-statistic(title="对局数" :value="rankSquadStats.roundsPlayed")
    el-row(:gutter="20")
      el-col(:span="6")
        el-statistic(title="赛季最高分" :value="rankSquadStats.bestRankPoint")
      el-col(:span="6")
        el-statistic(title="赛季最高段位" :value="rankSquadStats.bestTier.tier + rankSquadStats.bestTier.subTier")
      el-col(:span="6")
        el-statistic(title="击杀数" :value="rankSquadStats.kills")
      el-col(:span="6")
        el-statistic(title="总伤害" :value="rankSquadStats.damageDealt")

</template>
<script setup lang="ts">
import {computed, getCurrentInstance, ref} from 'vue'
const playerName: any = ref('')
const players = ref([
  { name: 'BLACKSIDEV98', label: '戒(BLACKSIDEV98)' },
  { name: 'SQ---TGLTN-_-', label: '猴(SQ---TGLTN-_-)' },
  { name: 'SG_LabMemberX', label: '胶(SG_LabMemberX)' },
])
const { proxy } = getCurrentInstance() as any

// 获取玩家信息
const player = ref(<any>{})
async function getPlayerInfo() {
  const res = await proxy.$api.pubg.getPlayerInfo(playerName.value)
  const [payload] = res.data
  player.value = {
    id: payload.id,
    name: payload.attributes.name,
    clanId: payload.attributes.clanId,
    banType: payload.attributes.banType,
    matches: payload.relationships.matches.data
  }
}

// 获取赛季列表
const seasons = ref([])
const currentSeason = ref('')
getSeasons()
async function getSeasons() {
  const hasSeasons = localStorage.getItem('allSeasons')
  let allSeasons = []
  if (!hasSeasons) {
    const res = await proxy.$api.pubg.getAllSeasons()
    allSeasons = res.data
    localStorage.setItem('allSeasons', JSON.stringify(allSeasons))
  } else {
    allSeasons = JSON.parse(hasSeasons)
  }
  const list = allSeasons.filter((e: any) => e.id.includes('division.bro.official.pc-2018'))
  list.map((e: any) => e.label = e.id.split('.')[3].split('-')[2] + '赛季')
  seasons.value = list

  const currentSeasonItem = list.find((e: any) => e.attributes.isCurrentSeason)
  currentSeason.value = currentSeasonItem.id
}

// 查询赛季玩家一般模式记录
const generalStats = ref(<any>{})
function getGeneralStatsBySeason() {
  proxy.$api.pubg.getPlayerSeason(player.value.id, currentSeason.value).then((res: any) => {
    const data = res.data
    generalStats.value = {
      gameModeStats: data.attributes.gameModeStats,
      matches: {
        matchesSolo: data.relationships.matchesSolo,
        matchesSoloFPP: data.relationships.matchesSoloFPP,
        matchesDuo: data.relationships.matchesDuo,
        matchesDuoFPP: data.relationships.matchesDuoFPP,
        matchesSquad: data.relationships.matchesSquad,
        matchesSquadFPP: data.relationships.matchesSquadFPP,
      }
    }
    console.log(`🍥 ~ 🍍 generalStats ➢`, generalStats.value)
  })
}

// 查询赛季玩家RANK记录
const rankStats = ref(<any>{})
function getRankStatsBySeason() {
  proxy.$api.pubg.getPlayerSeasonRanked(player.value.id, currentSeason.value).then((res: any) => {
    const data = res.data
    rankStats.value = {
      gameModeStats: data.attributes.rankedGameModeStats
    }
    console.log(`🍥 ~ 🍍 rankStats ➢`, rankStats.value)
  })
}

// 查询玩家生涯记录
const lifetimeStats = ref(<any>{})
function getLifetimeStats() {
  proxy.$api.pubg.getPlayerLifetime(player.value.id).then((res: any) => {
    const data = res.data
    lifetimeStats.value = {
      ...data.attributes
    }
    console.log(`🍥 ~ 🍍 lifetimeStats ➢`, lifetimeStats.value)
  })
}

// 查询按钮
async function search() {
  // await getPlayerInfo()
  // getGeneralStatsBySeason()
  // getRankStatsBySeason()
  // getLifetimeStats()
  player.value = {
    "id": "account.29044012052444c0848d617ba100fe1e",
    "name": "BLACKSIDEV98",
    "banType": "Innocent",
    "clanId": "clan.01cf8179aeda4b77a6543787f1d42bf7",
    "matches": [{
      "type": "match",
      "id": "d8290c94-0178-4aa1-a5ab-ad0aa15128b4"
    }, {
      "type": "match",
      "id": "462d3db3-3139-4773-8527-f90fbebef509"
    }, {
      "type": "match",
      "id": "20f24c1a-0323-4dd6-b627-cfae49ad3b38"
    }, {
      "type": "match",
      "id": "06abaf09-b948-46fc-a4ea-9696e7c95a74"
    }, {
      "type": "match",
      "id": "c751682d-4bf2-458e-b506-61f54b39d07a"
    }, {
      "type": "match",
      "id": "297b8f6d-f390-4155-b845-feb8a9a8d448"
    }, {
      "type": "match",
      "id": "4457812f-93f9-4da5-8624-e1cc5f24e167"
    }, {
      "type": "match",
      "id": "7a2ab21c-c350-4a4a-8f5e-b0a9bd714847"
    }, {
      "type": "match",
      "id": "1e3f05bc-d556-4b52-954a-707677c7274a"
    }, {
      "type": "match",
      "id": "38af688c-93a7-49a1-bf52-3aab2c6ffe3a"
    }, {
      "type": "match",
      "id": "0d72dab9-8f73-47f9-90ee-d10916c27bf9"
    }, {
      "type": "match",
      "id": "cf275486-c8b0-4fe1-85f0-bd9c96b7cded"
    }, {
      "type": "match",
      "id": "a6cb7689-2cba-41a7-b9ff-5db686ec448b"
    }, {
      "type": "match",
      "id": "f945e643-a3cc-4d0b-bce9-39bc99616cd5"
    }, {
      "type": "match",
      "id": "3e056e11-74cd-4bdd-ab9c-b2d26e3ce6c9"
    }, {
      "type": "match",
      "id": "c279b129-f6e7-4340-ba80-7ad24e204c30"
    }, {
      "type": "match",
      "id": "66142838-d25d-4400-8c02-6a80ff7a8da9"
    }, {
      "type": "match",
      "id": "25133237-8f91-42f5-b53d-752f340a9343"
    }, {
      "type": "match",
      "id": "78a6059b-61a8-48e6-8e13-e5aa7b325e5f"
    }, {
      "type": "match",
      "id": "955a79d1-c087-4b0c-bc57-f037c4a62fca"
    }, {
      "type": "match",
      "id": "31323555-4f79-4e7d-8684-c371a52c6257"
    }, {
      "type": "match",
      "id": "d07422c1-4d44-49c1-a13b-8ac6ff0b2150"
    }, {
      "type": "match",
      "id": "55942e7e-ca07-4424-91d9-9036f92343bc"
    }, {
      "type": "match",
      "id": "d1876505-94da-44b5-9587-d7760e5d7b40"
    }, {
      "type": "match",
      "id": "344bdc34-adc6-4ac6-8a11-058a096556d6"
    }, {
      "type": "match",
      "id": "1e76a33f-2c6c-4f1b-818b-20bd72240557"
    }, {
      "type": "match",
      "id": "c64b339d-64f5-432c-ac40-53aa38f48b8d"
    }, {
      "type": "match",
      "id": "b1e7ca23-c3c1-43c5-a8e3-7f965fb21c85"
    }, {
      "type": "match",
      "id": "115fa20b-f3f2-4885-a509-6a9301eb4d20"
    }, {
      "type": "match",
      "id": "abb4911a-90db-4991-a8a3-789329ab0308"
    }, {
      "type": "match",
      "id": "4b6b88aa-b5f3-421a-b5c2-ebd4df2638ad"
    }, {
      "type": "match",
      "id": "73d33b14-817c-44ef-b64b-45fb8b28f809"
    }, {
      "type": "match",
      "id": "ae8eda63-9f75-4fe4-9f09-fa2c09b78c91"
    }, {
      "type": "match",
      "id": "fb8371b3-fc43-471e-a04d-6562c41a98eb"
    }, {
      "type": "match",
      "id": "debec4f8-34d1-4307-a166-d2f794549c63"
    }, {
      "type": "match",
      "id": "7878a53b-118d-4dc5-a6dc-02e1a4ecd987"
    }, {
      "type": "match",
      "id": "9e51defc-da87-4d96-9a36-131f6438acf0"
    }, {
      "type": "match",
      "id": "ef886c55-9d29-42eb-b3e4-8f2235bcb86f"
    }, {
      "type": "match",
      "id": "fecf66b4-c2a2-4690-910e-13b32fb37b96"
    }, {
      "type": "match",
      "id": "2c09b31e-8e78-4bfc-9d75-32a8786d2ff6"
    }, {
      "type": "match",
      "id": "3384fdf5-2d05-448c-9dd0-df9a0971332d"
    }, {
      "type": "match",
      "id": "9ba7d1a3-7dba-457b-a269-0216bf5809ea"
    }, {
      "type": "match",
      "id": "16732fbc-7ef0-488f-8e8f-9538f24b7949"
    }, {
      "type": "match",
      "id": "cc5acac5-2b06-406f-b335-9ab7c96fc553"
    }, {
      "type": "match",
      "id": "afd36804-05d3-4ed2-9f3f-2217547a49d5"
    }, {
      "type": "match",
      "id": "2cf8bb72-8929-4708-b89c-0eb2976ebdb9"
    }, {
      "type": "match",
      "id": "5aef27d6-e36b-4e9e-b643-7ea3db1d6817"
    }, {
      "type": "match",
      "id": "f788bbbb-77a3-490a-987a-d08292d51ad1"
    }, {
      "type": "match",
      "id": "6ffb60ce-5246-4690-a627-7160b743fb43"
    }, {
      "type": "match",
      "id": "e51d1ae7-a92f-4bbc-8076-ca20af789ad3"
    }, {
      "type": "match",
      "id": "5864dcba-d201-4ee6-8e1c-c58f1e7eb531"
    }, {
      "type": "match",
      "id": "e25ad3ca-2719-4c79-b318-9daf5e27883f"
    }, {
      "type": "match",
      "id": "a1823105-ce00-4ebf-b49d-967a4405ce57"
    }, {
      "type": "match",
      "id": "99104fa4-d3a2-40af-8d65-3f3df8f0ea97"
    }, {
      "type": "match",
      "id": "a029e4e7-8755-49da-900f-8a8a9ef60c34"
    }, {
      "type": "match",
      "id": "060d3d38-eef6-425b-bd95-178e149cb1ec"
    }, {
      "type": "match",
      "id": "4ae71f11-f3ed-40ec-824a-10807eea27d2"
    }, {
      "type": "match",
      "id": "3d703570-6fe6-45ef-9ea7-7455d1b50733"
    }, {
      "type": "match",
      "id": "e716bdf4-8dd3-46aa-914f-1d92707c045d"
    }, {
      "type": "match",
      "id": "da4a4620-af36-460e-9c3f-66ebcf22c3d9"
    }, {
      "type": "match",
      "id": "9505a58f-3d5f-4fe7-98ca-cbebc384c19b"
    }, {
      "type": "match",
      "id": "56c508ab-cb00-44f8-b2b7-25cf28555469"
    }, {
      "type": "match",
      "id": "62a697e9-2ca3-40ab-9403-4f5a0dc0bba5"
    }, {
      "type": "match",
      "id": "c43d1157-6357-425d-bf5f-8017fc4c700d"
    }, {
      "type": "match",
      "id": "d4928f57-f2e4-458f-aa7c-e57eb31003bf"
    }, {
      "type": "match",
      "id": "7796de85-9171-4b01-89e6-84d03e4937a5"
    }, {
      "type": "match",
      "id": "3fb5014c-fbbb-4acb-aeed-f47fa4fa91ae"
    }, {
      "type": "match",
      "id": "acdd74b7-6379-4ea6-a4c6-e4d6a814cfae"
    }, {
      "type": "match",
      "id": "082843bb-3a5d-456c-b5a3-db4a3d7bb53f"
    }, {
      "type": "match",
      "id": "36d7e6a7-35e6-49ef-95c0-256c1f8d6358"
    }, {
      "type": "match",
      "id": "e1a100cc-628b-47df-812f-ad98e58e8711"
    }, {
      "type": "match",
      "id": "9bfed43b-ffe9-4dab-a566-ad7c0f79b8ff"
    }, {
      "type": "match",
      "id": "7cc377ff-3ccb-4cde-a9af-a05d85d42477"
    }, {
      "type": "match",
      "id": "0c927dfa-948f-436c-8f10-26bb89f62f5f"
    }, {
      "type": "match",
      "id": "ba0e8203-d8e9-4f5b-8797-0aa2f1bfdf4d"
    }, {
      "type": "match",
      "id": "ddadba1a-fe1b-4fcc-87a5-ddf65d4cf487"
    }, {
      "type": "match",
      "id": "a6f6c42d-bf0a-4567-acde-a87d4c95adbf"
    }, {
      "type": "match",
      "id": "0ca3b98f-c038-4117-beb8-76647457c934"
    }, {
      "type": "match",
      "id": "5c759c3c-3666-48c9-b7c9-412a5d944f82"
    }, {
      "type": "match",
      "id": "516c0916-18b7-4a91-b358-943aba44fec3"
    }, {
      "type": "match",
      "id": "881136e0-9fb6-4725-b09b-98cce8da7552"
    }, {
      "type": "match",
      "id": "4d5bafc6-5b6e-456c-881d-53d025c4dc4c"
    }, {
      "type": "match",
      "id": "3414cd2e-f93d-41bf-adc0-4c9c19da5fa4"
    }, {
      "type": "match",
      "id": "4f96c824-7b69-433a-aa59-30256f8708ee"
    }, {
      "type": "match",
      "id": "9656bcf5-4fdc-47d4-b1dc-295935bf3fc6"
    }, {
      "type": "match",
      "id": "4b41f66c-239f-4607-b514-9fdcd7aca117"
    }, {
      "type": "match",
      "id": "ce485cf9-011e-415b-979a-e8be1b03274b"
    }, {
      "type": "match",
      "id": "8e01ae8a-5e93-4257-81d3-f16fd51f00e8"
    }, {
      "type": "match",
      "id": "c0763a8b-4a3e-4083-9bfb-62a23b398704"
    }, {
      "type": "match",
      "id": "31abbf02-1748-4857-98e1-9c6d1137127a"
    }, {
      "type": "match",
      "id": "743a2aa9-ccf3-48a4-8f27-01c3eb3f292d"
    }, {
      "type": "match",
      "id": "f9e6b562-0737-4806-88ad-65438419d975"
    }, {
      "type": "match",
      "id": "a032225d-dcdd-4d41-86df-ec2a11c1ecf6"
    }, {
      "type": "match",
      "id": "288cf503-42ad-41dd-bd69-60d138800451"
    }, {
      "type": "match",
      "id": "5b46932e-7dbc-4791-96ab-e13d23f3990a"
    }, {
      "type": "match",
      "id": "5517849d-0959-4024-984e-b17ccf5b5735"
    }, {
      "type": "match",
      "id": "f8855e3b-3223-4e16-a561-3e237d005c53"
    }, {
      "type": "match",
      "id": "0741c96d-c8b8-452f-8d33-e7e1beb6a145"
    }, {
      "type": "match",
      "id": "524b8c56-c2b3-4bf6-9293-a811d9f435be"
    }, {
      "type": "match",
      "id": "5d2c2834-5d38-464c-840b-7defeda29d61"
    }, {
      "type": "match",
      "id": "5681e7e3-ffaa-4c77-829f-6ac2d710bac7"
    }, {
      "type": "match",
      "id": "379384d3-6fcc-4ba1-9406-c66219fceecb"
    }, {
      "type": "match",
      "id": "4b56aaf7-13e2-43da-ae09-2fa5553a39f1"
    }, {
      "type": "match",
      "id": "1d6d31b7-cb90-4b67-b3fd-5a66977c72d9"
    }, {
      "type": "match",
      "id": "b8cc643b-ffa1-49bb-8293-648c882b113e"
    }, {
      "type": "match",
      "id": "6196315f-757e-48d0-82de-2a9bc10fba7b"
    }, {
      "type": "match",
      "id": "cd41d2c8-6229-4262-8a5c-f1babd079e2c"
    }]
  }
  generalStats.value = {
    "gameModeStats": {
      "duo": {
        "assists": 0,
        "boosts": 2,
        "dBNOs": 0,
        "dailyKills": 0,
        "dailyWins": 0,
        "damageDealt": 260.14142,
        "days": 2,
        "headshotKills": 0,
        "heals": 5,
        "killPoints": 0,
        "kills": 3,
        "longestKill": 174.95436,
        "longestTimeSurvived": 1074,
        "losses": 4,
        "maxKillStreaks": 1,
        "mostSurvivalTime": 1074,
        "rankPoints": 0,
        "rankPointsTitle": "",
        "revives": 0,
        "rideDistance": 4016.9507,
        "roadKills": 0,
        "roundMostKills": 1,
        "roundsPlayed": 4,
        "suicides": 0,
        "swimDistance": 0,
        "teamKills": 0,
        "timeSurvived": 2161,
        "top10s": 0,
        "vehicleDestroys": 0,
        "walkDistance": 743.3586,
        "weaponsAcquired": 37,
        "weeklyKills": 3,
        "weeklyWins": 0,
        "winPoints": 0,
        "wins": 0
      },
      "duo-fpp": {
        "assists": 0,
        "boosts": 0,
        "dBNOs": 0,
        "dailyKills": 0,
        "dailyWins": 0,
        "damageDealt": 0,
        "days": 0,
        "headshotKills": 0,
        "heals": 0,
        "killPoints": 0,
        "kills": 0,
        "longestKill": 0,
        "longestTimeSurvived": 0,
        "losses": 0,
        "maxKillStreaks": 0,
        "mostSurvivalTime": 0,
        "rankPoints": 0,
        "rankPointsTitle": "",
        "revives": 0,
        "rideDistance": 0,
        "roadKills": 0,
        "roundMostKills": 0,
        "roundsPlayed": 0,
        "suicides": 0,
        "swimDistance": 0,
        "teamKills": 0,
        "timeSurvived": 0,
        "top10s": 0,
        "vehicleDestroys": 0,
        "walkDistance": 0,
        "weaponsAcquired": 0,
        "weeklyKills": 0,
        "weeklyWins": 0,
        "winPoints": 0,
        "wins": 0
      },
      "solo": {
        "assists": 0,
        "boosts": 8,
        "dBNOs": 0,
        "dailyKills": 7,
        "dailyWins": 0,
        "damageDealt": 711.96484,
        "days": 1,
        "headshotKills": 4,
        "heals": 12,
        "killPoints": 0,
        "kills": 7,
        "longestKill": 124.541824,
        "longestTimeSurvived": 926,
        "losses": 4,
        "maxKillStreaks": 1,
        "mostSurvivalTime": 926,
        "rankPoints": 0,
        "rankPointsTitle": "",
        "revives": 0,
        "rideDistance": 3749.8955,
        "roadKills": 0,
        "roundMostKills": 3,
        "roundsPlayed": 4,
        "suicides": 0,
        "swimDistance": 24.775331,
        "teamKills": 0,
        "timeSurvived": 2758,
        "top10s": 0,
        "vehicleDestroys": 0,
        "walkDistance": 3527.3596,
        "weaponsAcquired": 31,
        "weeklyKills": 7,
        "weeklyWins": 0,
        "winPoints": 0,
        "wins": 0
      },
      "solo-fpp": {
        "assists": 0,
        "boosts": 0,
        "dBNOs": 0,
        "dailyKills": 0,
        "dailyWins": 0,
        "damageDealt": 0,
        "days": 0,
        "headshotKills": 0,
        "heals": 0,
        "killPoints": 0,
        "kills": 0,
        "longestKill": 0,
        "longestTimeSurvived": 0,
        "losses": 0,
        "maxKillStreaks": 0,
        "mostSurvivalTime": 0,
        "rankPoints": 0,
        "rankPointsTitle": "",
        "revives": 0,
        "rideDistance": 0,
        "roadKills": 0,
        "roundMostKills": 0,
        "roundsPlayed": 0,
        "suicides": 0,
        "swimDistance": 0,
        "teamKills": 0,
        "timeSurvived": 0,
        "top10s": 0,
        "vehicleDestroys": 0,
        "walkDistance": 0,
        "weaponsAcquired": 0,
        "weeklyKills": 0,
        "weeklyWins": 0,
        "winPoints": 0,
        "wins": 0
      },
      "squad": {
        "assists": 0,
        "boosts": 5,
        "dBNOs": 4,
        "dailyKills": 2,
        "dailyWins": 0,
        "damageDealt": 423.24573,
        "days": 2,
        "headshotKills": 1,
        "heals": 0,
        "killPoints": 0,
        "kills": 4,
        "longestKill": 29.636074,
        "longestTimeSurvived": 1113,
        "losses": 5,
        "maxKillStreaks": 1,
        "mostSurvivalTime": 1113,
        "rankPoints": 0,
        "rankPointsTitle": "",
        "revives": 0,
        "rideDistance": 8079.3223,
        "roadKills": 0,
        "roundMostKills": 2,
        "roundsPlayed": 5,
        "suicides": 0,
        "swimDistance": 99.88878,
        "teamKills": 0,
        "timeSurvived": 3352,
        "top10s": 1,
        "vehicleDestroys": 0,
        "walkDistance": 8996.952,
        "weaponsAcquired": 41,
        "weeklyKills": 2,
        "weeklyWins": 0,
        "winPoints": 0,
        "wins": 0
      },
      "squad-fpp": {
        "assists": 0,
        "boosts": 0,
        "dBNOs": 0,
        "dailyKills": 0,
        "dailyWins": 0,
        "damageDealt": 0,
        "days": 0,
        "headshotKills": 0,
        "heals": 0,
        "killPoints": 0,
        "kills": 0,
        "longestKill": 0,
        "longestTimeSurvived": 0,
        "losses": 0,
        "maxKillStreaks": 0,
        "mostSurvivalTime": 0,
        "rankPoints": 0,
        "rankPointsTitle": "",
        "revives": 0,
        "rideDistance": 0,
        "roadKills": 0,
        "roundMostKills": 0,
        "roundsPlayed": 0,
        "suicides": 0,
        "swimDistance": 0,
        "teamKills": 0,
        "timeSurvived": 0,
        "top10s": 0,
        "vehicleDestroys": 0,
        "walkDistance": 0,
        "weaponsAcquired": 0,
        "weeklyKills": 0,
        "weeklyWins": 0,
        "winPoints": 0,
        "wins": 0
      }
    },
    "matches": {
      "matchesSolo": {
        "data": [{
          "type": "match",
          "id": "ef886c55-9d29-42eb-b3e4-8f2235bcb86f"
        }, {
          "type": "match",
          "id": "fecf66b4-c2a2-4690-910e-13b32fb37b96"
        }, {
          "type": "match",
          "id": "2c09b31e-8e78-4bfc-9d75-32a8786d2ff6"
        }, {
          "type": "match",
          "id": "3384fdf5-2d05-448c-9dd0-df9a0971332d"
        }]
      },
      "matchesSoloFPP": {
        "data": []
      },
      "matchesDuo": {
        "data": [{
          "type": "match",
          "id": "ae8eda63-9f75-4fe4-9f09-fa2c09b78c91"
        }, {
          "type": "match",
          "id": "debec4f8-34d1-4307-a166-d2f794549c63"
        }, {
          "type": "match",
          "id": "7878a53b-118d-4dc5-a6dc-02e1a4ecd987"
        }, {
          "type": "match",
          "id": "9e51defc-da87-4d96-9a36-131f6438acf0"
        }]
      },
      "matchesDuoFPP": {
        "data": []
      },
      "matchesSquad": {
        "data": [{
          "type": "match",
          "id": "9ba7d1a3-7dba-457b-a269-0216bf5809ea"
        }, {
          "type": "match",
          "id": "16732fbc-7ef0-488f-8e8f-9538f24b7949"
        }, {
          "type": "match",
          "id": "cc5acac5-2b06-406f-b335-9ab7c96fc553"
        }]
      },
      "matchesSquadFPP": {
        "data": []
      }
    }
  }
  rankStats.value = {
    "gameModeStats": {
      "squad": {
        "currentTier": {
          "tier": "Platinum",
          "subTier": "5"
        },
        "currentRankPoint": 2500,
        "bestTier": {
          "tier": "Diamond",
          "subTier": "5"
        },
        "bestRankPoint": 3054,
        "roundsPlayed": 302,
        "avgRank": 8.271523,
        "avgSurvivalTime": 0,
        "top10Ratio": 0.62913907,
        "winRatio": 0.0794702,
        "assists": 117,
        "wins": 24,
        "kda": 1.4875445,
        "kdr": 0,
        "kills": 301,
        "deaths": 281,
        "roundMostKills": 0,
        "longestKill": 0,
        "headshotKills": 0,
        "headshotKillRatio": 0,
        "damageDealt": 53563.562,
        "dBNOs": 337,
        "reviveRatio": 0,
        "revives": 0,
        "heals": 0,
        "boosts": 0,
        "weaponsAcquired": 0,
        "teamKills": 0,
        "playTime": 0,
        "killStreak": 0
      }
    }
  }
  lifetimeStats.value = {
    "gameModeStats": {
      "duo": {
        "assists": 283,
        "boosts": 1470,
        "dBNOs": 897,
        "dailyKills": 0,
        "dailyWins": 0,
        "damageDealt": 191000.89,
        "days": 181,
        "headshotKills": 304,
        "heals": 1849,
        "killPoints": 0,
        "kills": 1386,
        "longestKill": 348.70163,
        "longestTimeSurvived": 1978.383,
        "losses": 1420,
        "maxKillStreaks": 3,
        "mostSurvivalTime": 1978.383,
        "rankPoints": 1,
        "rankPointsTitle": "",
        "revives": 229,
        "rideDistance": 472643.16,
        "roadKills": 2,
        "roundMostKills": 10,
        "roundsPlayed": 1434,
        "suicides": 15,
        "swimDistance": 3467.1147,
        "teamKills": 18,
        "timeSurvived": 697068.06,
        "top10s": 198,
        "vehicleDestroys": 10,
        "walkDistance": 911536.2,
        "weaponsAcquired": 5406,
        "weeklyKills": 3,
        "weeklyWins": 0,
        "winPoints": 0,
        "wins": 17
      },
      "duo-fpp": {
        "assists": 0,
        "boosts": 0,
        "dBNOs": 0,
        "dailyKills": 0,
        "dailyWins": 0,
        "damageDealt": 0,
        "days": 0,
        "headshotKills": 0,
        "heals": 0,
        "killPoints": 0,
        "kills": 0,
        "longestKill": 0,
        "longestTimeSurvived": 0,
        "losses": 0,
        "maxKillStreaks": 0,
        "mostSurvivalTime": 0,
        "rankPoints": 0,
        "rankPointsTitle": "",
        "revives": 0,
        "rideDistance": 0,
        "roadKills": 0,
        "roundMostKills": 0,
        "roundsPlayed": 0,
        "suicides": 0,
        "swimDistance": 0,
        "teamKills": 0,
        "timeSurvived": 0,
        "top10s": 0,
        "vehicleDestroys": 0,
        "walkDistance": 0,
        "weaponsAcquired": 0,
        "weeklyKills": 0,
        "weeklyWins": 0,
        "winPoints": 0,
        "wins": 0
      },
      "solo": {
        "assists": 7,
        "boosts": 152,
        "dBNOs": 1,
        "dailyKills": 7,
        "dailyWins": 0,
        "damageDealt": 22981.357,
        "days": 76,
        "headshotKills": 59,
        "heals": 127,
        "killPoints": 0,
        "kills": 195,
        "longestKill": 226.49179,
        "longestTimeSurvived": 1559,
        "losses": 175,
        "maxKillStreaks": 3,
        "mostSurvivalTime": 1559,
        "rankPoints": 0,
        "rankPointsTitle": "",
        "revives": 0,
        "rideDistance": 55229.043,
        "roadKills": 0,
        "roundMostKills": 8,
        "roundsPlayed": 176,
        "suicides": 13,
        "swimDistance": 1387.0691,
        "teamKills": 2,
        "timeSurvived": 63928.785,
        "top10s": 8,
        "vehicleDestroys": 1,
        "walkDistance": 81848.38,
        "weaponsAcquired": 502,
        "weeklyKills": 7,
        "weeklyWins": 0,
        "winPoints": 0,
        "wins": 1
      },
      "solo-fpp": {
        "assists": 0,
        "boosts": 0,
        "dBNOs": 0,
        "dailyKills": 0,
        "dailyWins": 0,
        "damageDealt": 0,
        "days": 0,
        "headshotKills": 0,
        "heals": 0,
        "killPoints": 0,
        "kills": 0,
        "longestKill": 0,
        "longestTimeSurvived": 0,
        "losses": 0,
        "maxKillStreaks": 0,
        "mostSurvivalTime": 0,
        "rankPoints": 0,
        "rankPointsTitle": "",
        "revives": 0,
        "rideDistance": 0,
        "roadKills": 0,
        "roundMostKills": 0,
        "roundsPlayed": 0,
        "suicides": 0,
        "swimDistance": 0,
        "teamKills": 0,
        "timeSurvived": 0,
        "top10s": 0,
        "vehicleDestroys": 0,
        "walkDistance": 0,
        "weaponsAcquired": 0,
        "weeklyKills": 0,
        "weeklyWins": 0,
        "winPoints": 0,
        "wins": 0
      },
      "squad": {
        "assists": 439,
        "boosts": 1945,
        "dBNOs": 1698,
        "dailyKills": 2,
        "dailyWins": 0,
        "damageDealt": 244558.61,
        "days": 183,
        "headshotKills": 424,
        "heals": 2334,
        "killPoints": 0,
        "kills": 1725,
        "longestKill": 430.94458,
        "longestTimeSurvived": 1951.346,
        "losses": 1618,
        "maxKillStreaks": 5,
        "mostSurvivalTime": 1951.346,
        "rankPoints": 1,
        "rankPointsTitle": "",
        "revives": 313,
        "rideDistance": 784630.9,
        "roadKills": 3,
        "roundMostKills": 12,
        "roundsPlayed": 1656,
        "suicides": 35,
        "swimDistance": 5124.882,
        "teamKills": 42,
        "timeSurvived": 911342.2,
        "top10s": 353,
        "vehicleDestroys": 19,
        "walkDistance": 1304178,
        "weaponsAcquired": 6475,
        "weeklyKills": 2,
        "weeklyWins": 0,
        "winPoints": 0,
        "wins": 41
      },
      "squad-fpp": {
        "assists": 0,
        "boosts": 0,
        "dBNOs": 0,
        "dailyKills": 0,
        "dailyWins": 0,
        "damageDealt": 0,
        "days": 0,
        "headshotKills": 0,
        "heals": 0,
        "killPoints": 0,
        "kills": 0,
        "longestKill": 0,
        "longestTimeSurvived": 0,
        "losses": 0,
        "maxKillStreaks": 0,
        "mostSurvivalTime": 0,
        "rankPoints": 0,
        "rankPointsTitle": "",
        "revives": 0,
        "rideDistance": 0,
        "roadKills": 0,
        "roundMostKills": 0,
        "roundsPlayed": 0,
        "suicides": 0,
        "swimDistance": 0,
        "teamKills": 0,
        "timeSurvived": 0,
        "top10s": 0,
        "vehicleDestroys": 0,
        "walkDistance": 0,
        "weaponsAcquired": 0,
        "weeklyKills": 0,
        "weeklyWins": 0,
        "winPoints": 0,
        "wins": 0
      }
    },
    "bestRankPoint": 2228.4768
  }
}

const rankSquadStats: any = computed(() => {
  return rankStats.value.gameModeStats?.squad
})
// proxy.$api.pubg.getMatchesById('5665cd41-0090-4003-b77d-e0140e6cd32c').then((res: any) => {
//   resData.value = res.data
//   console.log(`🍥 ~ 🍍 resData ➢`, resData.value)
// })
</script>

<style lang="scss" scoped>

</style>
